var moddle="";
function ajaxComment(application_id,tangleAreaId,comment_list_id){
	var time = new Date().getTime();
    $.ajax ({
        url: base + "/user/communication/comment!save?time=" + time,
        data:  {
    				"moddle":moddle,
    				"commentary.application.id":application_id,
    				"commentary.content":document.getElementById(tangleAreaId).value
        		},
        async: false,
        type:'POST',
        success: function(resp){
        	document.getElementById(comment_list_id).innerHTML=subRespStr(""+resp,comment_list_id);
        	document.getElementById(tangleAreaId).value="";
        }
    });
	
}

function loadComment(application_id,comment_page_id){
	var time = new Date().getTime();
    $.ajax ({
        url: base + "/user/communication/?time=" + time,
        data:  {
    				"moddle":moddle,
    				"id":application_id,
    				"page":1
        		},
        async: false,
        type:'POST',
        success: function(resp){
        	document.getElementById(comment_page_id).innerHTML=subRespStr(""+resp,comment_page_id);
//        			document.write(""+resp);
        }
    });
	
}

function openReply(id){
	document.getElementById(id).style.display="";
}

function ajaxReply(comment_id,tangleAreaId,reply_list_id){
	var time = new Date().getTime();
    $.ajax ({
        url: base + "/user/communication/reply!save?time=" + time,
        data:  {
    				"moddle":moddle,
    				"reply.commentary.id":comment_id,
    				"reply.content":document.getElementById(tangleAreaId).value
        		},
        async: false,
        type:'POST',
        success: function(resp){
        	document.getElementById(reply_list_id).innerHTML=resp;
        	document.getElementById(tangleAreaId).value="";
        	document.getElementById("comment"+comment_id).style.display="none";
        }
    });
}